Report post

How do I specify an image as a border around an element?

Specify an image as the border around an element: More "Try it Yourself" examples below. The border-image property allows you to specify an image to be used as the border around an element. The border-image property is a shorthand property for: Omitted values are set to their default values.

Does border-image work if I don't specify a width?

border-image won’t do anything if you don’t specify a width for your border. For browsers that understand border-image, your image slices will be scaled to the specified width. If you use the border shorthand property, it provides a nice fallback for browsers that don’t: LIVE DEMO, RSS READERS CLICK OVER TO SEE.

What is a border-image-source image?

The border-image-source image is a composite image of eight of the same heart icon, sliced so that the full heart shape is used on each side of the element. Though support for border-image has improved — it’s supported unprefixed in all current browser versions — setting a fallback border style is still worthwhile.

The World's Leading Crypto Trading Platform

Get my welcome gifts